import Vue from 'vue'
import 'normalize.css/normalize.css'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'

import '@/styles/index.scss' // global css

import App from './App'

import store from './store'

import router from './router'

// 注册svg
import '@/icons'

Vue.use(ElementUI)

Vue.config.productionTip = false

// 移除el-radio中 aria-hidden 报错属性bug, 使用 ->  <el-xxx v-removeAriaHidden>
Vue.directive('removeAriaHidden', {
  bind(el, binding) {
    let ariaEls = el.querySelectorAll('.el-radio__original');
    ariaEls.forEach((item) => {
      item.removeAttribute('aria-hidden');
    });
  }
});

// vue实例化
new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
